<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>用户统计</h2>
	</div>
	<div class="cf">

		<div>
		今日实时总盈利量：{$yingli_cnt}<br/>
			总盈利量：{$yingli_total_cnt}
		</div>
		<!-- 高级搜索 -->
		<div class="search-form cf fr">
			<div class="fl">
				开始时间<input type="text" class="text input-2x" name="begin_time" id="begin_time" value="<notempty name="param.begin_time">{$param.begin_time}</notempty>" placeholder="开始时间">
				结束时间	<input type="text" class="text input-2x" name="end_time" id="end_time" value="<notempty name="param.end_time">{$param.end_time}</notempty>" placeholder="结束时间">&nbsp;&nbsp;
			</div>

			<div class="sleft">
				<input type="text" name="uid" class="search-input" value="{$param.uid}" placeholder="请输入用户id">
				<a class="sch-btn" href="javascript:;" id="search" url="{:U('Statistics/user_statistics', false)}"><i class="btn-search"></i></a>
			</div>

		</div>
	</div>
	<!-- 数据列表 -->
	<div class="data-table table-striped">
		<table class="">
			<thead>
			<tr>
				<th class="">用户ID</th>
				<th class="">用户名称</th>
				<th class="">下注量</th>
				<th class="">中奖量</th>
				<th class="">盈利量</th>
			</tr>
			</thead>
			<tbody>
			<notempty name="_list">
				<volist name="_list" id="vo">
					<tr>
						<td>{$vo.uid} </td>
						<td>{$vo.nickname}</td>
						<td>{$vo.totalmoney}</td>
						<td>{$vo.win_money}</td>
						<td>{$vo.yingli}</td>

					</tr>
				</volist>
				<else/>
				<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
			</notempty>
			</tbody>
		</table>
	</div>
	<div class="page">
		{$_page}
	</div>
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
	<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
	<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
	<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap-select.css" />
	<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap-typeahead.css" />
	<script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap.js"></script>
	<script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap-select.js"></script>
	<script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap-typeahead.js"></script>
	<script type="text/javascript" charset="utf-8">
        $(function(){
            //日期时间选择器
            $("#begin_time").datetimepicker({
                format: "yyyy-mm-dd",
                autoclose: true,
                minView: "month",
                maxView: "decade",
                todayBtn: true,
                language: 'zh-CN',
                pickerPosition: "bottom-left"
            }).on("click",function(ev){
                $("#begin_time").datetimepicker("setEndDate", $("#end_time").val());
            });

            $("#end_time").datetimepicker({
                format: "yyyy-mm-dd",
                autoclose: true,
                minView: "month",
                maxView: "decade",
                language: 'zh-CN',
                todayBtn: true,
                pickerPosition: "bottom-left"
            }).on("click", function (ev) {
                $("#end_time").datetimepicker("setStartDate", $("#begin_time").val());
            });
        });
	</script>
	<script type="text/javascript">
        $(function(){
            //搜索功能
            $("#search").click(function(){
                var url = $(this).attr('url');
                var status = $("#sch-sort-txt").attr("data");
                var query  = $('.search-form').find('input').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
                query = query.replace(/^&/g,'');

                if( url.indexOf('?')>0 ){
                    url += '&' + query;
                }else{
                    url += '?' + query;
                }
                window.location.href = url;
            });

            //回车自动提交
            $('.search-form').find('input').keyup(function(event){
                if(event.keyCode===13){
                    $("#search").click();
                }
            });

            //导航高亮
            highlight_subnav('{:U('Product/'.$_type)}');
        })
	</script>
</block>
